<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns:shro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>公告详情</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="cjf">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="/css/style.min.css" rel="stylesheet">
    <link href="/js/feed.xml">
    <link href="/css/style.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/froala_editor.min.css"/>
    <link rel="stylesheet" href="/css/froala_editor.pkgd.min.css"/>
    <link href="/css/main/main-detail.css" rel="stylesheet">
    <!-- 弹出框 -->
    <link rel="stylesheet" href="/js/jconfirm/jquery-confirm.min.css">
    <link rel="stylesheet" href="/css/skin.css">

</head>

<body>
<div class="container-fluid p-t-15">
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header">
                    <h4></h4>
                    <div class="btn-group bianji" style="display: flex;">
                        <!-- 1为用户模块-公告查看 没有编辑功能-->
                        <input type="hidden" id="type" th:value="${type}">
                        <div class="isSuper">
                            <div th:if=" ${type} != '1'" >
                                <span style="display:inline-block;margin-right: 20px;border-bottom: 1px solid #33cabb;color: #33cabb;"
                                   id="editBtn" onclick="editFormFun()">编辑</span>
                            </div>
                        </div>

                        <span style="display:inline-block;margin-right: 20px; border-bottom: 1px solid #33cabb;color: #33cabb;"
                              id="saveBtn" onclick="saveEditAnnounce()">保存</span>
                        <span id="cancelBtn" onclick="cancelEditAnnounce();">取消</span>
                    </div>
                </div>
                <!-- 首页公告表格 -->
                <div id="editForm" class="card-body" style="padding: 0 156px; margin-top: 20px;line-height: 36px;text-align: center;">
                    <h4 th:text="${title}"></h4>
                    <div style="display: flex;justify-content: center;color: #ccc;font-size: 12px;">
                        <div style="margin-right: 20px;">发布人：<span th:text="${publisher}"></span></div>
                        <!--<div style="margin-right: 20px;">发布部门：<span th:text="${dept}"></span></div>-->
                        <div style="margin-right: 20px;">发布时间：<span th:text="${publishTm}"></span></div>
                    </div>
                    <div class="container-fuwenben" th:utext="${notifyContent}"></div>
                    <div id="annexLook" style="cursor: pointer;display: flex;flex-flow: row wrap;justify-content:center;margin-top: 10px;">
                        <span>附件：</span>
                        <div style="cursor: pointer;" th:each="file:${files}">
                            <ul style="padding: 0;margin-right: 30px;">
                                <li style="display:inline-block;">
                                    <a th:name="${file.uploadId}" th:href="${file.accessUrl}" download="" target="_blank">
                                        <div style="color: #33cabb;margin-right: 20px;" id="uploadFile" th:text="${file.fileName}"></div>
                                    </a>
                                </li>
                                <li style="display:inline-block">
                                    <label style="font-size: 12px;color: #ccc;" name="delFile" th:data-id="${file.uploadId}"
                                           onclick="delOneFile(this.getAttribute('data-id'))">删除</label>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div id="saveForm" class="card-body" style="margin-top: 20px;line-height: 36px;text-align: center;">
                    <div class="row">
                        <div class="col-lg-12">
                            <form class="form-horizontal" action="#" method="post" enctype="multipart/form-data"
                                  onsubmit="return false;">
                                <div class="form-group" style="display: flex;">
                                    <label style="margin-left: -74px;margin-top: -5px;" class="col-xs-2 control-label"
                                           for="title">公告标题</label>
                                    <div class="col-xs-4">
                                        <input th:value="${title}" class="form-control" type="text"
                                               id="title" name="title" placeholder="请输入标题"
                                               autocomplete="off" maxlength="20">
                                    </div>
                                </div>
                                <div style="display: none;" id="isTop" th:text="${isTop}"></div>
                                <div class="form-group">
                                    <label style="margin-left: -74px;margin-top: -5px;" class="col-xs-2 control-label">置顶状态</label>
                                    <div class="col-xs-6" style="margin-left: -166px;">
                                        <label class="radio-inline" for="noTop"
                                               style="margin-right: 20px;margin-top: -10px;">
                                            <input checked style="margin-top: 13px;" type="radio" id="noTop"
                                                   name="isTop" value="0">不置顶
                                        </label>
                                        <label class="radio-inline" for="top" style="margin-top: -10px;">
                                            <input style="margin-top: 13px;" type="radio" id="top" name="isTop"
                                                   value="1">置顶
                                        </label>
                                    </div>
                                </div>
                                <div th:text="${notifyContent}" id="notifyContent" style="display: none;"></div>
                                <div class="form-group">
                                    <label style="margin-left: -74px;margin-top: -5px;" class="col-xs-2 control-label">正文内容</label>
                                    <div class="col-xs-9" style="padding-bottom: 20px;">
                                        <div id="editor"></div>
                                    </div>
                                </div>
                                <!-- 公告id，修改后保存使用 -->
                                <div class="hidden" id="notifyId" th:text="${notifyId}"></div>
                                <!-- 编辑附件使用 -->
                                <div class="form-group" id="fileUpload">
                                    <label style="margin-left: -74px;margin-top: -5px;" class="col-xs-2  control-label"
                                           for="files">附件上传</label>
                                    <div class="col-xs-6">
                                        <input type="file" name="files" id="files" onchange="getUploadFile(this)" multiple>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-xs-12" id="annexEdit" style="cursor: pointer;display: flex;flex-flow: row wrap;height: 30px;line-height: 30px;"></div>
                                </div>
                                <div class="form-group">
                                    <!--进度条部分(默认隐藏)-->
                                    <div style="display: none;" class="progress-body">
                                        <div class="col-xs-4">
                                            <span style="display: inline-block; text-align: right">上传进度：</span>
                                            <progress></progress>
                                            <percentage>0%</percentage>
                                        </div>
                                        <div class="col-xs-4">
                                            <span class="progress-info">请选择文件</span>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>

<script type="text/javascript"
        src="https://cdn.jsdelivr.net/npm/froala-editor@3.1.0/js/froala_editor.pkgd.min.js"></script>

<script type="text/javascript" src="/js/froala_editor.min.js"></script>
<script type="text/javascript" src="/js/froala_editor.pkgd.min.js"></script>
<script type="text/javascript" src="/js/crm/main/upload.js"></script>
<script type="text/javascript" src="/js/crm/common/common.js"></script>
<script type="text/javascript" src="/js/zh_cn.js"></script>
<!-- 弹出框 -->
<script src="/js/jconfirm/jquery-confirm.min.js"></script>

</body>
</html>
